﻿using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

namespace JYJ.AiYard.Migrations
{
    public partial class add_YardParamesSetStationParamsDiscountBill : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
                 

          
            migrationBuilder.CreateTable(
                name: "Tb_DiscountBill",
                schema: "Dbo",
                columns: table => new
                {
                    Id = table.Column<long>(nullable: false)
                        .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                    Station_ID = table.Column<long>(maxLength: 65, nullable: false),
                    TsaleId = table.Column<long>(maxLength: 65, nullable: false),
                    TbillNo = table.Column<string>(maxLength: 65, nullable: true),
                    TbillName = table.Column<string>(maxLength: 65, nullable: true),
                    TbillInfor = table.Column<string>(maxLength: 65, nullable: true),
                    TsaleNo = table.Column<string>(maxLength: 65, nullable: true),
                    TsaleName = table.Column<string>(maxLength: 65, nullable: true),
                    TsalePayStatus = table.Column<int>(maxLength: 65, nullable: false),
                    TsalePayTime = table.Column<DateTime>(maxLength: 65, nullable: false),
                    Tbedt = table.Column<DateTime>(maxLength: 65, nullable: false),
                    Texdt = table.Column<DateTime>(maxLength: 65, nullable: false),
                    TbillType = table.Column<int>(maxLength: 65, nullable: false),
                    TdeduType = table.Column<int>(maxLength: 65, nullable: false),
                    TdeduValue = table.Column<decimal>(maxLength: 65, nullable: false),
                    TcreateTime = table.Column<DateTime>(maxLength: 65, nullable: false),
                    TcreateOpId = table.Column<int>(maxLength: 65, nullable: false),
                    TcreateOpNo = table.Column<int>(maxLength: 65, nullable: false),
                    TcreateOpName = table.Column<string>(maxLength: 65, nullable: false),
                    TtermType = table.Column<int>(maxLength: 65, nullable: false),
                    TtermValue = table.Column<decimal>(maxLength: 65, nullable: false),
                    Tamount = table.Column<decimal>(maxLength: 65, nullable: false),
                    TrecvOpenId = table.Column<string>(maxLength: 65, nullable: true),
                    TrecvTime = table.Column<DateTime>(maxLength: 65, nullable: false),
                    TrecvUserId = table.Column<int>(maxLength: 65, nullable: false),
                    TrecvUserNo = table.Column<int>(maxLength: 65, nullable: false),
                    TrecvUserName = table.Column<string>(maxLength: 65, nullable: false),
                    TuseStatus = table.Column<int>(maxLength: 65, nullable: false),
                    TuseTime = table.Column<DateTime>(maxLength: 65, nullable: false),
                    TpayType = table.Column<int>(maxLength: 65, nullable: false),
                    TrecordId = table.Column<int>(maxLength: 65, nullable: false),
                    Tpassword = table.Column<string>(maxLength: 65, nullable: true),
                    TenantId = table.Column<int>(maxLength: 65, nullable: false),
                    CreationTime = table.Column<DateTime>(maxLength: 65, nullable: false),
                    CreatorUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModifierUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModificationTime = table.Column<DateTime>(maxLength: 65, nullable: true),
                    IsDeleted = table.Column<bool>(maxLength: 65, nullable: false),
                    DeleterUserId = table.Column<long>(maxLength: 65, nullable: true),
                    DeletionTime = table.Column<DateTime>(maxLength: 65, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Tb_DiscountBill", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Tb_StationParams",
                schema: "Dbo",
                columns: table => new
                {
                    Id = table.Column<long>(nullable: false)
                        .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                    Station_ID = table.Column<long>(maxLength: 65, nullable: false),
                    Client_ID = table.Column<long>(maxLength: 65, nullable: false),
                    SYID = table.Column<long>(maxLength: 65, nullable: false),
                    SYIP = table.Column<string>(maxLength: 32, nullable: true),
                    SYNM = table.Column<string>(maxLength: 65, nullable: true),
                    SYDS = table.Column<string>(maxLength: 65, nullable: true),
                    SYTY = table.Column<string>(maxLength: 65, nullable: true),
                    SYVL = table.Column<string>(maxLength: 256, nullable: true),
                    SYGJ = table.Column<bool>(maxLength: 65, nullable: false),
                    SYDT = table.Column<DateTime>(maxLength: 65, nullable: false),
                    TenantId = table.Column<int>(maxLength: 65, nullable: false),
                    CreationTime = table.Column<DateTime>(maxLength: 65, nullable: false),
                    CreatorUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModifierUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModificationTime = table.Column<DateTime>(maxLength: 65, nullable: true),
                    IsDeleted = table.Column<bool>(maxLength: 65, nullable: false),
                    DeleterUserId = table.Column<long>(maxLength: 65, nullable: true),
                    DeletionTime = table.Column<DateTime>(maxLength: 65, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Tb_StationParams", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Tb_YardParamsSet",
                schema: "Dbo",
                columns: table => new
                {
                    Id = table.Column<long>(nullable: false)
                        .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                    Station_ID = table.Column<long>(maxLength: 65, nullable: false),
                    tPass_Client_ID = table.Column<long>(maxLength: 65, nullable: false),
                    tPass_ID = table.Column<int>(maxLength: 65, nullable: false),
                    tPass_SNo = table.Column<int>(maxLength: 65, nullable: false),
                    tPass_IO = table.Column<int>(maxLength: 65, nullable: false),
                    tPass_Vdi = table.Column<int>(maxLength: 65, nullable: false),
                    tPass_Odi = table.Column<int>(maxLength: 65, nullable: false),
                    tPass_Ddi = table.Column<int>(maxLength: 65, nullable: false),
                    tPass_Sdi = table.Column<int>(maxLength: 65, nullable: false),
                    tPass_Ldi = table.Column<int>(maxLength: 65, nullable: false),
                    tPass_YCHK = table.Column<bool>(maxLength: 65, nullable: false),
                    tPass_CCHK = table.Column<bool>(maxLength: 65, nullable: false),
                    tPass_LCHK = table.Column<bool>(maxLength: 65, nullable: false),
                    tPass_MCHK = table.Column<bool>(maxLength: 65, nullable: false),
                    tPass_TCHK = table.Column<bool>(maxLength: 65, nullable: false),
                    tPass_L_I = table.Column<bool>(maxLength: 65, nullable: false),
                    tPass_L_O = table.Column<bool>(maxLength: 65, nullable: false),
                    tPass_JC = table.Column<bool>(maxLength: 65, nullable: false),
                    tPass_Onwer = table.Column<int>(maxLength: 65, nullable: false),
                    tPass_Pay = table.Column<int>(maxLength: 65, nullable: false),
                    TenantId = table.Column<int>(maxLength: 65, nullable: false),
                    CreationTime = table.Column<DateTime>(maxLength: 65, nullable: false),
                    CreatorUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModifierUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModificationTime = table.Column<DateTime>(maxLength: 65, nullable: true),
                    IsDeleted = table.Column<bool>(maxLength: 65, nullable: false),
                    DeleterUserId = table.Column<long>(maxLength: 65, nullable: true),
                    DeletionTime = table.Column<DateTime>(maxLength: 65, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Tb_YardParamsSet", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Tb_DiscountBill",
                schema: "Dbo");

            migrationBuilder.DropTable(
                name: "Tb_StationParams",
                schema: "Dbo");

            migrationBuilder.DropTable(
                name: "Tb_YardParamsSet",
                schema: "Dbo");

                        

           
        }
    }
}
